package org.anupta.game.server.inter.client;

import org.anupta.game.server.inter.packet.InterPacketID;
import org.anupta.game.server.inter.packet.account.AccountWaiting;
import org.apache.mina.core.buffer.IoBuffer;

public class InterParser {
	private InterClient client = null;
	
	public InterParser(InterClient client){
		setClient(client);
	}
	
	public void parseBuffer(IoBuffer buffer){
		InterPacketID id = InterPacketID.getPacket(buffer.get());
		switch(id){
		case ACCOUNT_WAITING:
			new AccountWaiting(client,buffer);
			break;
		}
	}

	public InterClient getClient() {
		return client;
	}

	public void setClient(InterClient client) {
		this.client = client;
	}
}
